const beersong = require('../src/beersong');

describe(' The beersong',function(){

    it("return number bottles of beer when beer's number greater than 1",function(){
        let number = 3;
        expect(beersong(number)).toEqual('3 bottles of beer on the wall, 3 bottles of beer.\n'+
        'Take one down and pass it around, 2 bottles of beer on the wall.\n'+
        '2 bottles of beer on the wall, 2 bottles of beer.\n'+
        'Take one down and pass it around, 1 bottles of beer on the wall.\n'+
        '1 bottles of beer on the wall, 1 bottles of beer.\n'+
        'Take one down and pass it around, no more bottles of beer on the wall.\n'+
        'No more bottles of beer on the wall, no more bottles of beer.\n'+
        'Go to the store and buy some more, 99 bottles of beer on the wall.');
    })
    it("return number bottles of beer when beer's number equal 1",function(){
        let number = 1;
        expect(beersong(number)).toEqual('1 bottles of beer on the wall, 1 bottles of beer.\n'+
        'Take one down and pass it around, no more bottles of beer on the wall.\n'+
        'No more bottles of beer on the wall, no more bottles of beer.\n'+
        'Go to the store and buy some more, 99 bottles of beer on the wall.');
    })
    it("return number bottles of beer when beer's number equal 0",function(){
        let number = 0;
        expect(beersong(number)).toEqual('No more bottles of beer on the wall, no more bottles of beer.\n'+
        'Go to the store and buy some more, 99 bottles of beer on the wall.');
    })
})